package program;

public class Street extends Ownable {

	public Street(int fieldNr, int payment, String name, String type, int color, int colorNr) {
		super(fieldNr, payment, name, type, color, colorNr);
	}

	public void rent(Player player, Player tempOwner, int varPayment){
		if(player.withdraw(varPayment) == false){ // withdraw metoden virker i positive tal.
			player.setLost(true); //Sets that player to looser.
		}
		tempOwner.deposit(varPayment);
	}
}
